<?php
class Controller_App_Gonglue extends Controller_App_Template
{
    public function __construct ($req, $res)
    {
        $this->template = "smarty:app/gonglue_detail";
        parent::__construct($req, $res);
    }

    // 二级分类
    public function action_detail ($nid = 1)
    {
        //
        $detail = App_Gonglue::detail($nid);
        $this->template->set('gonglue', $detail);
        $this->template->set('title', $detail['name']);
        $this->template->set('global_item', array('nid' => $nid, 'type' => 'gonglue',

            'countsLike' => Arr::get($detail, 'countsLike', 0),
            'isLiked'    => (int) $this->_user->hasAction('gonglue', $nid, NULL),
        ));
    }
}
